package com.learn.injection;

import org.springframework.beans.factory.InitializingBean;
import org.springframework.stereotype.Service;

import java.util.Date;

/**
 * @author Created by chenxin34 on 2021/7/8 下午9:57.
 */
@Service
public class BB implements InitializingBean {
    public BB() {
        System.out.println(new Date() + "constructor BB");
    }

    @Override
    public void afterPropertiesSet() throws Exception {
        System.out.println("B afterPropertiesSet");
        try {
            Thread.sleep(1000);
        } catch (InterruptedException e) {
            e.printStackTrace();
        }
    }
}
